#version 130

uniform float scale;
uniform float angle;
uniform float x;
uniform float y;
uniform float z;

void main() {
	//scaling
	float xPos = gl_Vertex.x * scale;
	float yPos = gl_Vertex.y * scale;
	//rotation
	xPos = cos(angle)*xPos + sin(angle)*yPos;
	yPos = cos(angle)*yPos + sin(-angle)*xPos;
	//transformation
	vec2 position = vec2(xPos, yPos) + vec2(x, y);
	
	gl_Position = vec4(position, z, 1);
}